<!--#include file="Config.asp"-->
<!--#include file="emp_is.asp"-->
<!--#include file="Header.asp"-->
<%
intID=int(Request("t_id"))
ActionType=request("ActionType")
SaveType=request("SaveType")
set rs=server.createobject("adodb.recordset")

'Add
if ActionType="Add" or ActionType="" then
AName="确定增加"
URL="?SaveType=AddOK"
end if

'Mod
if ActionType="Mod" and intID<>"" then
AName="确定修改"
sql="select * from basic_title where t_id="&Intid
rs.open sql,conn,1,1
t_title=trim(rs("t_title"))
t_etitle=trim(rs("t_etitle"))
T_type=trim(rs("T_type"))
T_order=trim(rs("T_order"))
rs.close
At_id=intID
URL="?SaveType=ModOK&t_id="&intID
end if

'SaveAdd
if SaveType="AddOK" and request("t_title")<>"" then
sql="select * from basic_title where t_id is null"
rs.open sql,conn,1,3
rs.addnew
rs("t_title")=trim(Request("t_title"))
rs("t_etitle")=trim(Request("t_etitle"))
rs("t_type")=trim(Request("t_type"))
rs("t_order")=trim(Request("t_order"))
rs.Update
rs.close
end if

'SaveMod
if SaveType="ModOK" and intID<>"" and request("t_title")<>"" then
sql="select * from basic_title where t_id="&IntID
rs.open sql,conn,1,3
rs("t_title")=trim(Request("t_title"))
rs("t_etitle")=trim(Request("t_etitle"))
rs("t_type")=trim(Request("t_type"))
rs("t_order")=trim(Request("t_order"))
rs.Update
rs.close

end if
%>
<!--添加  -->
<table class="table table-condensed table-hover table-striped table-bordered">
<form method="post" action="<%=URL%>" name="form1">
<tr>
<th>
t_title：<input type="text" name="t_title" value="<%=t_title%>">
t_etitle：<input type="text" name="t_etitle" value="<%=t_etitle%>">
t_type：<input type="text" name="t_type" value="<%=t_type%>">
t_order：<input type="text" name="t_order" value="<%=t_order%>">
<input type="submit" name="Submit" value="<%=aname%>">
<A HREF="?ActionType=Add">[<U><FONT COLOR="#FF0000"><B>增加</B></FONT></U>]</A>
</td>
</tr>
</form>
</table>

<table class="table table-condensed table-hover table-striped table-bordered">
<tr bgcolor='#ddeeff'>
<TD>t_id</td>
<TD>t_order</td>
<TD>t_title</td>
<TD>t_etitle</td>
<TD>t_type</td>
<TD>Admin</td>
</tr>
<%
sql="select * from basic_title order by t_order"
rs.open sql,conn,1,1
for r=1 to rs.recordcount
%>
<tr >
<TD><%=rs("t_id")%></td>
<TD><%=trim(rs("t_order"))%></td>
<TD><%=rs("t_title")%></td>
<TD><%=rs("t_etitle")%>&nbsp;</td>
<TD><%=rs("t_type")%></td>
<TD><A HREF="?ActionType=Mod&t_id=<%=trim(rs("t_id"))%>" title='点击修改'>管理</A></td>
</tr>
<%
rs.moveNext
next
rs.close
%>
</TABLE>

<!--#include file="Footer.asp" -->